package cn.big.bigd.biocode.service;

import org.springframework.stereotype.Service;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * @ClassName: CategoryService
 * @Description: TODO
 * @Author: FanWang
 * @CreateDate: 2018/1/17 下午1:13
 * @Version: 1.0
 * @Copyright: Copyright (c) 2018/1/17
 **/
@Service
public class CategoryService {
    @PersistenceContext
    private EntityManager entityManager;

 /*   public List<Map<String, Object>> findLatestTools() {
        String sql="SELECT releases.*,tools.name FROM releases INNER JOIN tools ON tools.id=releases.tool_id ORDER BY releases.created_at DESC ";
        Query query=entityManager.createNativeQuery(sql);
        query.unwrap(SQLQuery.class).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);//设置按照数据库字段返回map 结果集

        List<Map<String, Object>> listRe= query.getResultList();
        return listRe;
    }*/






}
